home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 4
/
FM Towns Free Software Collection 4 - Disc 1.iso
/
heat
/
nifty.cfg
< prev
next >
Wrap
Text File
|
1991-10-18
|
7KB
|
306 lines
/*********************************************************************
/*
/* NIFTY.CFG : NIFTY-Serve アクセス用コンフィグ・ファイル
/*
/* TABSIZE = 4;
/*
/*------------------------------------------------------------------
/* Nifty-Serve DIAL
/*------------------------------------------------------------------
nifty_dial {
HDL_SET = 0; /* メタキー設定用ワーク */
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/* 電話番号は自分で書いてね
/*
DIAL = "XX-XXXX-XXXX" /* 電話番号を書き込んでください。
FENIX = 1; /* Road 2の場合は「2」にしてください
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
while ( _NIF_ID = "" )
{ while ( _NIF_PASSWORD = "" )
{ nif_setup()
if ( VAL ! 0 ) { return (-1) }
}
}
ID = _NIF_ID;
PASSWORD = _NIF_PASSWORD;
term_puts("ATZ\r")
term_switch( 5,"OK\r")
if ( VAL < 0 ) { return (-1)}
# /* 第2モデモ初期化コマンド
# term_puts("AT%2400\r")
# term_switch( 5,"OK\r")
# if ( VAL < 0 ) { return (-1)}
tel_call()
if ( VAL < 0 ) { return (-1)}
if ( FENIX = 2 )
{ /*----------------------------------
/* NIFTY-Serve FENIX ROAD 2
/*----------------------------------
RETRY = 0;
bk = 0;
while ( bk = 0 )
{ wait(1)
term_puts("@P\r")
term_switch(10,"*")
if ( VAL = 0 )
{ /* '*' */
bk = 1;
} else
{ inc(RETRY)
if ( RETRY > 5 ) { return (-1) }
}
}
RERTY = 0;
bk = 0;
while ( bk = 0 )
{ wait(1)
term_puts("C NIF\r")
wait(2)
term_instr(30," Enter Connection-ID --->","*")
if ( VAL = 0 )
{ /* Connection-ID */
bk = 1;
} else if ( VAL = 1 )
{ /* '*' */
inc(RETRY)
if ( RETRY > 30 ) { return }
} else
{ /* TIME OUT
return (-1)
}
}
} else
{ /*----------------------------------
/* NIFTY-Serve FENIX ROAD 1
/*----------------------------------
RERTY = 0;
bk = 0;
while ( bk = 0 )
{ wait(1)
term_puts(".00+")
term_instr(30,"Enter Connection-ID --->",
".1", ".2", ".3", ".4", ".5",
".6", ".7", ".8", ".9",
"NO CARRIER" )
if ( VAL = 0 )
{ /* Connection-ID */
bk = 1;
} else if ( VAL < 10 )
{ /* '*' */
inc(RETRY)
if ( RETRY > 30 ) { return }
} else
{ /* TIME OUT or "NO CARRIER" */
return (-1);
}
}
}
wait(1)
term_puts("SVC\r")
term_switch( 30, " Enter User-ID --->")
if ( VAL < 0 ) { return (-1)}
wait(1)
term_puts("\(ID)\r")
term_switch( 30, " Enter Password --->")
if ( VAL < 0 ) { return (-1)}
wait(1)
term_puts("\(PASSWORD)\r")
return (0)
}
/*--------------------------------------------------------------------
/* パレットを黒にして入力文字を見せないようにする
/*
str_off {
wind_size_set(x,y,32,32)
wind_open()
graph("palette",7,0,0,0)
}
str_on {
graph("palette",7,176,176,192)
wind_close()
wind_init()
}
nif_setup {
ID = _NIF_ID;
PASSWORD = _NIF_PASSWORD;
if ( ID = "" )
{ ID = "";
PASSWORD = "";
}
mosget("sw","x","y")
menu_input("ID",9, x,y, C_CYAN, "NIFTY-Serve のID を入力してください。:")
if ( VAL < 0 ) { return (-1) }
str_off()
menu_input("PASSWORD",9, x,y, C_YELLOW, "NIFTY-Serve のパスワードを入力してください。:" )
RET = VAL;
if ( RET < 0 ) { str_on(); return (-1) }
PASSWORD2 = "";
menu_input("PASSWORD2",9, x,y, C_YELLOW, "もういちどパスワードを入力してください。" )
RET = VAL;
str_on()
if ( RET < 0 ) { return (-1) }
if ( PASSWORD ! PASSWORD2 )
{ wind_open()
graph("symbol",65,56, 8,16, OPAQUE,C_RED,C_HWHITE, 1,0,0,1, "パスワードが違っています!!")
wait(5)
wind_close()
return (-1)
}
if ( RET < 0 ) { return (-1) }
strlen(PASSWORD)
LEN = VAL;
menu_yes_no(x,y,C_CYAN,"NIFTY-Serve の ID : \(ID)\x0Aパスワードは \(LEN) 文字指定されています。\x0A\x0A よろしいですか?")
if ( VAL > 0 )
{ _NIF_ID = ID;
_NIF_PASSWORD = PASSWORD;
return (0)
}
return (-1)
}
/*********************************************************************
/* 行入力コマンド
/*
/* 【入力】 TCMD コマンド
/*
TERM_cmdline {
strupr("TCMD",TCMD)
if ( TCMD = "U" )
{ NIFTY_RT_U()
} else if ( TCMD = "MYHP" )
{ NIFTY_MYHP()
}
RET = ""
}
/*******************************************************************
/* オートパイロット用 入力行チェックルーチン
/*******************************************************************
AUTO_line {
if ( HDL_SET ! 0 )
{ /********************************/
/* ハンドル 自動設定 ルーチン */
/********************************/
instr(TLIN,"\r")
if ( VAL > 0 )
{ get_word("TMP",TLIN,1)
if ( TMP ! "JOB" )
{ strmid("CH",TLIN,0,1)
if ( CH = "\x28" ) /* 0x28 = '(' */
{ HDL_SET = 0;
} else
{ get_word("HANDLE", TLIN, 4 );
if ( HANDLE ! "" )
{ if ( HANDLE ! HANDLE_MEMO )
{ HANDLE_MEMO = HANDLE;
if ( meta = 1 )
{ meta_set("1",HANDLE )
} else if ( meta = 2 )
{ meta_set("2",HANDLE )
} else if ( meta = 3 )
{ meta_set("3",HANDLE )
} else if ( meta = 4 )
{ meta_set("4",HANDLE )
} else if ( meta = 5 )
{ meta_set("5",HANDLE )
} else if ( meta = 6 )
{ meta_set("6",HANDLE )
} else if ( meta = 7 )
{ meta_set("7",HANDLE )
} else if ( meta = 8 )
{ meta_set("8",HANDLE )
} else if ( meta = 9 )
{ meta_set("9",HANDLE )
} else if ( meta = 10 )
{ meta_set("0",HANDLE )
HDL_SET = 0;
}
inc(meta)
}
}
}
}
}
}
}
/*********************************************************************
/*
/* RT中に "/U" を実行し,
/* 表示されたハンドルをメタキーの0~9に設定する
/*
NIFTY_RT_U {
wind_close()
wind_init()
wind_open()
HDL_SET = 0;
echo("NIFTY-Serve RT用 メタキーハンドル名自動設定\n\n")
echo(" '/u'を実行しメタキーにハンドル名を設定します。\n")
wait(3)
wind_close()
HANDLE_MEMO = ""
meta = 1;
HDL_SET = 1;
term_puts("/U\r")
}
NIF_ERR {
echo("\n\tなんかへん???\n")
wait(5)
wind_close()
}
NIFTY_MYHP {
/* 自分のHPに行く */
wind_close()
wind_init()
echo("\n\t自分のHPにいくぜ!\n")
wait(1)
term_puts("go HP\r")
wait(2)
term_switch(30,">")
if ( VAL < 0 ) { NIF_ERR(); return (-1) }
term_puts("1\r")
term_switch(30,":")
term_puts("\(_NIF_ID)\r")
wait(2)
term_switch(30,"HP>","◆")
if ( VAL < 0 ) { NIF_ERR(); return (-1) }
if ( VAL = 1 ) { NIF_ERR(); return (-1) }
term_puts("guest\r")
wait(2)
term_switch(30,"HP>")
if ( VAL < 0 ) { NIF_ERR(); return (-1) }
term_puts("read new\r")
wind_close()
}